package com.learning.security.controller;

import com.learning.security.service.AdminRoleRightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/role")
public class AdminRoleRightController {
    @Autowired
    private AdminRoleRightService adminRoleRightService;

    @PostMapping("/assignRight")
    public boolean assignRight(Long roleId, Long rightId) {
        return adminRoleRightService.assignRight(roleId, rightId);
    }
}
